package com.gxa.ssm340.common;

import lombok.Data;

import java.io.Serializable;

/**
 * @author 赵文川
 * @Description: $
 * @date 2023/10/23 16:05
 */
@Data
public class Render<T> implements Serializable {
    private String msg;
    private Integer code;
    private T data;
    private Integer count;

    /**
     * 返回成功状态的一个r方法
     * @param <T>
     * @return
     */
    public static <T> Render success(T data,Integer count) {
        Render r = new Render();
        r.setMsg("success");
        r.setCode(0);
        r.setData(data);
        r.setCount(count);
        return r;
    }

}
